﻿using System.Web;
using System.Web.Optimization;

namespace CNKI.TPI.Web.UI
{
    //public class CssRewriteUrlTransformWrapper : IItemTransform
    //{
    //    public string Process(string includedVirtualPath, string input)
    //    {
    //        return new CssRewriteUrlTransform().Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input);
    //    }
    //}

    public class BundleConfig
    {
        // 有关 Bundling 的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js", "~/Content/autocomplete/jquery-ui.js", "~/Content/autocomplete/jquery.js", "~/Scripts/jquery.form.js"));
            bundles.Add(new ScriptBundle("~/bundles/jqueryform").Include("~/Scripts/jquery.form.js"));
            //bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
            //            "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"
                        ));

            bundles.Add(new ScriptBundle("~/bundles/rsa").Include(
            "~/Scripts/BigInt.js", "~/Scripts/Barrett.js",
            "~/Scripts/RSA.js"
            ));

            // 使用 Modernizr 的开发版本进行开发和了解信息。然后，当你做好
            // 生产准备时，请使用 http://modernizr.com 上的生成工具来仅选择所需的测试。
            //bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
            //            "~/Scripts/modernizr-*"));
            //前台公共js
            bundles.Add(new ScriptBundle("~/bundles/js").Include(
                        "~/Scripts/js.js", "~/Scripts/common.js", "~/Scripts/admin/json2.js"));



            //公用日期控件js
            bundles.Add(new ScriptBundle("~/Scripts/admin/DateInput/WdatePicker.js").Include("~/Scripts/admin/DateInput/WdatePicker.js"));
            //公用jquryuiCSS
            bundles.Add(new StyleBundle("~/Content/autocomplete/jquery-ui.css").Include("~/Content/autocomplete/jquery-ui.css"));

            //编辑器js
            bundles.Add(new ScriptBundle("~/Tookit/kindeditor/kindeditor-min.js").Include("~/Tookit/kindeditor/kindeditor-min.js"));

            //上传控件

            bundles.Add(new ScriptBundle("~/Tookit/Swfupload/swfupload/swfupload.js").Include("~/Tookit/Swfupload/swfupload/swfupload.js"));
            bundles.Add(new ScriptBundle("~/Tookit/Swfupload/js/swfupload.queue.js").Include("~/Tookit/Swfupload/js/swfupload.queue.js"));
            bundles.Add(new ScriptBundle("~/Tookit/Swfupload/js/fileprogress.js").Include("~/Tookit/Swfupload/js/fileprogress.js"));
            bundles.Add(new ScriptBundle("~/Tookit/Swfupload/js/filegroupprogress.js").Include("~/Tookit/Swfupload/js/filegroupprogress.js"));
            bundles.Add(new ScriptBundle("~/Tookit/Swfupload/js/handlers.js").Include("~/Tookit/Swfupload/js/handlers.js"));

            bundles.Add(new StyleBundle("~/Tookit/Swfupload/css.css").Include("~/Tookit/Swfupload/css.css"));

            //jwplayer js
            bundles.Add(new ScriptBundle("~/Content/jwplayer/jwplayer.js").Include("~/Content/jwplayer/jwplayer.js"));

            //jplayer js
            bundles.Add(new ScriptBundle("~/Content/jplayer/jquery.jplayer.js").Include("~/Content/jplayer/jquery.jplayer.js"));
            //jplayer css
            bundles.Add(new StyleBundle("~/Content/jplayer/skin/blue.monday/css/jplayer.blue.monday.css").Include("~/Content/jplayer/skin/blue.monday/css/jplayer.blue.monday.css"));

            //前台公共css模板页
            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/common.css", 
                "~/Content/iconfont.css", "~/Content/style.css","~/Content/ie-css3.htc"));
            //前台公共css 首页模板
            bundles.Add(new StyleBundle("~/Content/cssHome").Include("~/Content/common.css",
                "~/Content/iconfont.css", "~/Content/style1.css", "~/Content/iconfont-ie.css",
                "~/Content/ie-css3.htc"));


            //树形菜单js css
            bundles.Add(new StyleBundle("~/Content/dhtmlxTree/css").Include("~/Content/dhtmlxTree/codebase/skins/dhtmlxtree_dhx_skyblue.css"));
            bundles.Add(new ScriptBundle("~/Content/dhtmlxTree/js").Include(
                 "~/Content/dhtmlxTree/codebase/ext/dhtmlxtree_start.js",
                "~/Content/dhtmlxTree/codebase/dhtmlxtree.js",
                    "~/Content/dhtmlxTree/codebase/dhtmlxcommon.js"
                ));

            //后台js
            bundles.Add(new StyleBundle("~/Content/admin/style/css").Include("~/Content/admin/style/common.css", 
                "~/Content/admin/style/iconfont.css", "~/Content/admin/style/style.css", "~/Content/admin/style/iconfont-ie.css",
                "~/Content/admin/style/ie-css3.htc"));
            bundles.Add(new ScriptBundle("~/bundles/admin/js").Include(
            "~/Scripts/admin/js.js", "~/Scripts/admin/json2.js", "~/Scripts/admin/common_admin.js"));
             //可编辑表格 ,
            bundles.Add(new ScriptBundle("~/bundles/jqgridjs").Include("~/Content/jqgrid/jquery.jqGrid.js", "~/Content/jqgrid/grid.locale-cn.js",
                "~/Content/jqgrid/grid.locale-en.js"));
            bundles.Add(new StyleBundle("~/bundles/jqgridcss").Include("~/Content/jqgrid/ui.jqgrid.css"));

        }
    }
}